package com.oop.demo05;

//在Java中，所有的类，都默认直接或间接继承Object
//Person 人 ：父类
public class Person /*extends Object*/ {

    //public
    //protected
    //default
    //private


    public Person() {
        System.out.println("Person无参构造执行了！");
    }

    protected String name = "xiaoming";

    //私有的东西无法被继承！
    public void print() {
        System.out.println("Person");
    }

    private int money = 10_0000_0000;

    public void say(){
        System.out.println("说了一句话！");
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }
}

/*
    public static void main(String[] args) {
        Student student = new Student();
        student.say();
        System.out.println(student.getMoney());

        student.test("小明");
        student.test1();

        Person person = new Person();

    }
 */